<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title>FCKeditor</title>
	<meta name="robots" content="noindex, nofollow">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="Cache-Control" content="public">
	<link rel="stylesheet" type="text/css" href="/saas/fckeditor/editor/fck.css" />
	<script type="text/javascript">
if ( document.location.protocol == 'file:' )
{
	try
	{
		window.parent.document.domain ;
	}
	catch ( e )
	{
		window.addEventListener( 'load', function()
			{
				document.body.innerHTML = '\
					<div style="border: 1px red solid; font-family: arial; font-size: 12px; color: red; padding:10px;">\
						<p>\
							<b>Your browser security settings don\'t allow FCKeditor to be opened from\
							the local filesystem.<\/b>\
						<\/p>\
						<p>\
							Please open the <b>about:config<\/b> page and disable the\
							&quot;security.fileuri.strict_origin_policy&quot; option; then load this page again.\
						<\/p>\
						<p>\
							Check our <a href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/FAQ#ff3perms">FAQ<\/a>\
							for more information.\
						<\/p>\
					<\/div>' ;
			}, false ) ;
	}
}

// Save a reference to the default domain.
var FCK_ORIGINAL_DOMAIN ;

// Automatically detect the correct document.domain (#123).
(function()
{
	var d = FCK_ORIGINAL_DOMAIN = document.domain ;

	while ( true )
	{
		// Test if we can access a parent property.
		try
		{
			var test = window.parent.document.domain ;
			break ;
		}
		catch( e ) {}

		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
		d = d.replace( /.*?(?:\.|$)/, '' ) ;

		if ( d.length == 0 )
			break ;		// It was not able to detect the domain.

		try
		{
			document.domain = d ;
		}
		catch (e)
		{
			break ;
		}
	}
})() ;

// Save a reference to the detected runtime domain.
var FCK_RUNTIME_DOMAIN = document.domain ;

var FCK_IS_CUSTOM_DOMAIN = ( FCK_ORIGINAL_DOMAIN != FCK_RUNTIME_DOMAIN ) ;

// Instead of loading scripts and CSSs using inline tags, all scripts are
// loaded by code. In this way we can guarantee the correct processing order,
// otherwise external scripts and inline scripts could be executed in an
// unwanted order (IE).

function LoadScript( url )
{
	document.write( '<scr' + 'ipt type="text/javascript" src="' + url + '"><\/scr' + 'ipt>' ) ;
}

// Main editor scripts.
var sSuffix = ( /*@cc_on!@*/false ) ? 'ie' : 'gecko' ;

LoadScript( 'js/fckeditorcode_' + sSuffix + '.js' ) ;

// Base configuration file.
LoadScript( '../fckconfig.js' ) ;

	</script>
	<script type="text/javascript">
FCK.changeContent=false;
// Adobe AIR compatibility file.
if ( FCKBrowserInfo.IsAIR )
	LoadScript( 'js/fckadobeair.js' ) ;

if ( FCKBrowserInfo.IsIE )
{
	// Remove IE mouse flickering.
	try
	{
		document.execCommand( 'BackgroundImageCache', false, true ) ;
	}
	catch (e)
	{
		// We have been reported about loading problems caused by the above
		// line. For safety, let's just ignore errors.
	}

	// Create the default cleanup object used by the editor.
	FCK.IECleanup = new FCKIECleanup( window ) ;
	FCK.IECleanup.AddItem( FCKTempBin, FCKTempBin.Reset ) ;
	FCK.IECleanup.AddItem( FCK, FCK_Cleanup ) ;
}

// The first function to be called on selection change must the the styles
// change checker, because the result of its processing may be used by another
// functions listening to the same event.
FCK.Events.AttachEvent( 'OnSelectionChange', function() {FCKStyles.CheckSelectionChanges() ;} ) ;

// The config hidden field is processed immediately, because
// CustomConfigurationsPath may be set in the page.
FCKConfig.ProcessHiddenField() ;

// Load the custom configurations file (if defined).
if ( FCKConfig.CustomConfigurationsPath.length > 0 )
	LoadScript( FCKConfig.CustomConfigurationsPath ) ;

	</script>
	<script type="text/javascript">

// Load configurations defined at page level.
FCKConfig_LoadPageConfig() ;

FCKConfig_PreProcess() ;

// Load the full debug script.
if ( FCKConfig.Debug )
	LoadScript( '_source/internals/fckdebug.js' ) ;

	</script>
	<script type="text/javascript">

// CSS minified by http://iceyboard.no-ip.org/projects/css_compressor (see _dev/css_compression.txt).
var FCK_InternalCSS			= FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'html{min-height:100%}table.FCK__ShowTableBorders,table.FCK__ShowTableBorders td,table.FCK__ShowTableBorders th{border:#d3d3d3 1px solid}form{border:1px dotted #F00;padding:2px}.FCK__Flash{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_flashlogo.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__UnknownObject{border:#a9a9a9 1px solid;background-position:center center;background-image:url(images/fck_plugin.gif);background-repeat:no-repeat;width:80px;height:80px}.FCK__Anchor{border:1px dotted #00F;background-position:center center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;width:16px;height:15px;vertical-align:middle}.FCK__AnchorC{border:1px dotted #00F;background-position:1px center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}a[name]{border:1px dotted #00F;background-position:0 center;background-image:url(images/fck_anchor.gif);background-repeat:no-repeat;padding-left:18px}.FCK__PageBreak{background-position:center center;background-image:url(images/fck_pagebreak.gif);background-repeat:no-repeat;clear:both;display:block;float:none;width:100%;border-top:#999 1px dotted;border-bottom:#999 1px dotted;border-right:0;border-left:0;height:5px}.FCK__InputHidden{width:19px;height:18px;background-image:url(images/fck_hiddenfield.gif);background-repeat:no-repeat;vertical-align:text-bottom;background-position:center center}.FCK__ShowBlocks p,.FCK__ShowBlocks div,.FCK__ShowBlocks pre,.FCK__ShowBlocks address,.FCK__ShowBlocks blockquote,.FCK__ShowBlocks h1,.FCK__ShowBlocks h2,.FCK__ShowBlocks h3,.FCK__ShowBlocks h4,.FCK__ShowBlocks h5,.FCK__ShowBlocks h6{background-repeat:no-repeat;border:1px dotted gray;padding-top:8px;padding-left:8px}.FCK__ShowBlocks p{background-image:url(images/block_p.png)}.FCK__ShowBlocks div{background-image:url(images/block_div.png)}.FCK__ShowBlocks pre{background-image:url(images/block_pre.png)}.FCK__ShowBlocks address{background-image:url(images/block_address.png)}.FCK__ShowBlocks blockquote{background-image:url(images/block_blockquote.png)}.FCK__ShowBlocks h1{background-image:url(images/block_h1.png)}.FCK__ShowBlocks h2{background-image:url(images/block_h2.png)}.FCK__ShowBlocks h3{background-image:url(images/block_h3.png)}.FCK__ShowBlocks h4{background-image:url(images/block_h4.png)}.FCK__ShowBlocks h5{background-image:url(images/block_h5.png)}.FCK__ShowBlocks h6{background-image:url(images/block_h6.png)}' ) ;
var FCK_ShowTableBordersCSS	= FCKTools.FixCssUrls( FCKConfig.BasePath + 'css/', 'table:not([border]),table:not([border]) > tr > td,table:not([border]) > tr > th,table:not([border]) > tbody > tr > td,table:not([border]) > tbody > tr > th,table:not([border]) > thead > tr > td,table:not([border]) > thead > tr > th,table:not([border]) > tfoot > tr > td,table:not([border]) > tfoot > tr > th,table[border=\"0\"],table[border=\"0\"] > tr > td,table[border=\"0\"] > tr > th,table[border=\"0\"] > tbody > tr > td,table[border=\"0\"] > tbody > tr > th,table[border=\"0\"] > thead > tr > td,table[border=\"0\"] > thead > tr > th,table[border=\"0\"] > tfoot > tr > td,table[border=\"0\"] > tfoot > tr > th{border:#d3d3d3 1px dotted}' ) ;

// Popup the debug window if debug mode is set to true. It guarantees that the
// first debug message will not be lost.
if ( FCKConfig.Debug )
	FCKDebug._GetWindow() ;

// Load the active skin CSS.
document.write( FCKTools.GetStyleHtml( FCKConfig.SkinEditorCSS ) ) ;

// Load the language file.
FCKLanguageManager.Initialize() ;
LoadScript( 'lang/' + FCKLanguageManager.ActiveLanguage.Code + '.js' ) ;

	</script>
	<script type="text/javascript">

// Initialize the editing area context menu.
FCK_ContextMenu_Init() ;

FCKPlugins.Load() ;

	</script>
	<script type="text/javascript">

// Set the editor interface direction.
window.document.dir = FCKLang.Dir ;

	</script>
	<script type="text/javascript">

window.onload = function()
{
	InitializeAPI() ;

	if ( FCKBrowserInfo.IsIE )
		FCK_PreloadImages() ;
	else
		LoadToolbarSetup() ;
	if ( !FCKBrowserInfo.IsIE ) {
		var xToolbarStandard = document.getElementById("xToolbarStandard");
		xToolbarStandard.style.height = "25px";
		xToolbarStandard.style.border = "1px solid #696969";
		xToolbarStandard.style.borderBottom="none";
	}
	parent.jQuery(document.getElementById("xEditorTable")).find(".editbox-button").hover(
			function(){if(!this.getAttribute("disabled"))parent.jQuery(this).addClass("editbox-button-over");},
			function(){if(!this.getAttribute("disabled"))parent.jQuery(this).removeClass("editbox-button-over");});
	parent.jQuery(document.getElementById("xEditorTable")).find(".btn-short").hover(
			function(){parent.jQuery(this).addClass("btn-short-over");},
			function(){parent.jQuery(this).removeClass("btn-short-over");});
}

function LoadToolbarSetup()
{
	FCKeditorAPI._FunctionQueue.Add( LoadToolbar ) ;
}

function LoadToolbar()
{
	var oToolbarSet = FCK.ToolbarSet = FCKToolbarSet_Create() ;
	if ( oToolbarSet.IsLoaded )
		StartEditor() ;
	else
	{
		oToolbarSet.OnLoad = StartEditor ;
		oToolbarSet.Load( FCKURLParams['Toolbar'] || 'Default' ) ;
	}
}

function StartEditor()
{
	// Remove the onload listener.
	FCK.ToolbarSet.OnLoad = null ;

	FCKeditorAPI._FunctionQueue.Remove( LoadToolbar ) ;

	FCK.Events.AttachEvent( 'OnStatusChange', WaitForActive ) ;

	// Start the editor.
	FCK.StartEditor() ;
}

function WaitForActive( editorInstance, newStatus )
{
	if ( newStatus == FCK_STATUS_ACTIVE )
	{
		if ( FCKBrowserInfo.IsGecko )
			FCKTools.RunFunction( window.onresize ) ;

		if ( !FCKConfig.PreventSubmitHandler )
			_AttachFormSubmitToAPI() ;

		FCK.SetStatus( FCK_STATUS_COMPLETE ) ;

		// Call the special "FCKeditor_OnComplete" function that should be present in
		// the HTML page where the editor is located.
		if ( typeof( window.parent.FCKeditor_OnComplete ) == 'function' )
			window.parent.FCKeditor_OnComplete( FCK ) ;
		if(FCK.ToolbarSet.Name=="Workform" || FCK.ToolbarSet.Name=="FreeFlow")
			FCK.RulerControllor.show();
		if(FCK.ToolbarSet.Name=="FreeFlow")
			FCK.Tab.show();
		if(FCK.ToolbarSet.Name=="Workform"){
			document.getElementById("xToolbarUserDefined").style.display="";
			if(FCKBrowserInfo.IsIE){
				FCKeditorAPI.GetInstance('wf_editor').EditorDocument.attachEvent( "onkeydown", function(){FCK.changeContent=true;});
			}else{
				FCKeditorAPI.GetInstance('wf_editor').EditorDocument.addEventListener( "keydown", function(){FCK.changeContent=true;},false);
			}
		}
	}
}

// Gecko and Webkit browsers don't calculate well the IFRAME size so we must
// recalculate it every time the window size changes.
if ( FCKBrowserInfo.IsGecko || ( FCKBrowserInfo.IsSafari && !FCKBrowserInfo.IsSafari3 ) )
{
	window.onresize = function( e )
	{
		// Running in Firefox's chrome makes the window receive the event including subframes.
		// we care only about this window. Ticket #1642.
		// #2002: The originalTarget from the event can be the current document, the window, or the editing area.
		if ( e && e.originalTarget && e.originalTarget !== document && e.originalTarget !== window && (!e.originalTarget.ownerDocument || e.originalTarget.ownerDocument != document ))
			return ;

		var oCell = document.getElementById( 'xEditingArea' ) ;

		var eInnerElement = oCell.firstChild ;
		if ( eInnerElement )
		{
			eInnerElement.style.height = '0px' ;
			eInnerElement.style.height = ( oCell.scrollHeight - 3 ) + 'px' ;
		}
	}
}

FCK.Tab = function(){};

FCK.Tab.show = function()
{
	document.getElementById("xToolbarTabs").style.display = "";
	
	var xToolbarStandard = document.getElementById("xToolbarStandard");
	xToolbarStandard.style.height = (document.all?25:24)+"px";
	xToolbarStandard.style.border = "1px solid #cdcbcf";
	xToolbarStandard.style.borderTopWidth = "0px";
	
	for(var i = 0; i<xToolbarStandard.childNodes.length; i++)
	{
		if(xToolbarStandard.childNodes[i].tagName && xToolbarStandard.childNodes[i].tagName.toLowerCase()=="table")
		{
			xToolbarStandard.childNodes[i].style.width = "100px";
			
			break;
		}
	}
	
	document.getElementById("xCollapseHandle").style.display = "none";
	
	document.getElementById("xToolbar").style.border = "0px solid #ffffff";
	
	var tds = document.getElementById("xToolbarStandard").getElementsByTagName("td");
	for(var i = 0; i<tds.length; i++)
		if(tds[i].className.indexOf("TB_SideBorder")>-1)
			tds[i].style.display = "none";
	
	var xToolbarAdvanced = document.getElementById("xToolbarAdvanced");
	xToolbarAdvanced.style.display = "";
	xToolbarAdvanced.getElementsByTagName("div")[0].style.marginLeft = "-"+(document.all?30:20)+"px";
	
	if(!document.all)
		document.getElementById("xEditorTable").style.height = "470px";
}

FCK.Tab.changeToolbar = function(show, hide)
{
	document.getElementById("xToolbarTabs"+show).className = "tabItemL tabActive";
	document.getElementById("xToolbarTabs"+hide).className = "tabItemL";
	
	document.getElementById("xToolbar"+show).style.display = "";
	document.getElementById("xToolbar"+hide).style.display = "none";
}

FCK.toolbarAdvanced = function(element)
{
	element.className = element.className=="hide"?"show":"hide";
	
	var height1 = (document.all?25:24);
	var height2 = (document.all?49:48);
	document.getElementById("xToolbarStandard").style.height = (element.className=="hide"?height1:height2)+"px";
}

FCK.RulerControllor = function(){};

FCK.RulerControllor.moveEnable = false;
FCK.RulerControllor.direction = null;
FCK.RulerControllor.view = null;
FCK.RulerControllor.verticalWidth = 16;
FCK.RulerControllor.verticalTop = 90;

document.onmousedown = function()
{
	FCK.RulerControllor.moveEnable = true;
}

document.onmouseup = function()
{
	FCK.RulerControllor.moveEnable = false;
	FCK.RulerControllor.direction = null;
	FCK.RulerControllor.view = null;
}

FCK.RulerControllor.setMargin = function(left, right, top, bottom)
{
	var dbody = FCK.RulerControllor.findIframeBodyMarginElement();
	if(!dbody)
		return null;
	dbody.setAttribute("mleft",left+"px");
	dbody.setAttribute("mright",right+"px");
	dbody.setAttribute("mtop",top+"px");
	dbody.setAttribute("mbottom",bottom+"px");
	FCK.RulerControllor.show();
	return dbody;
}

FCK.RulerControllor.show = function()
{
	if(FCK.ToolbarSet.Name!="Workform" && FCK.ToolbarSet.Name!="FreeFlow"){
		return;
	}
	var xToolbarAdvanced = document.getElementById("xToolbarAdvanced");
	xToolbarAdvanced.style.display = "";
	document.getElementById("xCollapseHandle").style.display = "none";
	xToolbarAdvanced.getElementsByTagName("div")[0].style.marginLeft = "-50px";
	xToolbarAdvanced.getElementsByTagName("div")[0].style.className = "hide";
	
	document.getElementById("x-editor-ruler-h").style.display = "";
	document.getElementById("x-editor-ruler-v").style.display = "";

	var ibody = FCK.RulerControllor.findIframeBodyElement();
	var dbody = FCK.RulerControllor.findIframeBodyMarginElement();

	if(!dbody)
		return;

	ibody.style.overflow = "scroll";

	var width = FCK.RulerControllor.move.width();
	var height = FCK.RulerControllor.move.heigth();
	var left = FCK.RulerControllor.number(dbody.getAttribute("mleft"));
	if(left>0)
	{
		ibody.style.marginLeft = dbody.getAttribute("mleft");
		document.getElementById("xEditorRulerLeftDataL").style.width = (FCK.RulerControllor.verticalWidth+left)+"px";
		FCK.RulerControllor.move.setData2("xEditorRulerLeftDataL", "xEditorRulerLeftDataR", left<20, Math.floor(100*left/width)+"%");
	}

	var right = FCK.RulerControllor.number(dbody.getAttribute("mright"));
	if(right>0)
	{
		ibody.style.marginRight = dbody.getAttribute("mright");
		document.getElementById("xEditorRulerRightDataR").style.width = (document.getElementById("xEditorRulerH").offsetWidth-FCK.RulerControllor.verticalWidth-width+right)+"px";
		document.getElementById("xEditorRulerRightDataL").innerHTML = Math.floor(100*right/width)+"%";
	}

	var top = FCK.RulerControllor.number(dbody.getAttribute("mtop"));
	if(top>0)
	{
		ibody.style.marginTop = dbody.getAttribute("mtop");
		document.getElementById("xEditorRulerTopDataT").style.height = top+"px";
		FCK.RulerControllor.move.setData2("xEditorRulerTopDataT", "xEditorRulerTopDataB", top<20, Math.floor(100*top/height)+"%");
	}

	var bottom = FCK.RulerControllor.number(dbody.getAttribute("mbottom"));
	if(bottom>0)
	{
		ibody.style.marginBottom = dbody.getAttribute("mbottom");
		document.getElementById("xEditorRulerBottomDataB").style.height = (document.getElementById("xEditorRulerV").offsetHeight-height+bottom)+"px";
		document.getElementById("xEditorRulerBottomDataT").innerHTML = Math.floor(100*bottom/height)+"%";
	}
	var color = dbody.getAttribute("bgcolor");
	ibody.style.backgroundColor=color;
	hideOrShow("");
}

FCK.RulerControllor.number = function(str)
{
    return str?Number(new String(str).match(/[-0-9]+/)):0;
}

FCK.RulerControllor.hide = function()
{
	document.getElementById("x-editor-ruler-h").style.display = "none";
	document.getElementById("x-editor-ruler-v").style.display = "none";
	hideOrShow("disabled");
}

FCK.RulerControllor.preprocess = function(position, view)
{
	FCK.RulerControllor.direction = position;
	FCK.RulerControllor.view = view;
}

FCK.RulerControllor.move = function(event)
{
	if(!FCK.RulerControllor.moveEnable || !FCK.RulerControllor.direction || !FCK.RulerControllor.view)
		return;

	event = event || window.event;

	if(FCK.RulerControllor.direction=="left" && event.clientX>FCK.RulerControllor.verticalWidth)
	{
		var width = FCK.RulerControllor.move.width();
		var x = event.clientX-FCK.RulerControllor.verticalWidth;

		FCK.RulerControllor.findIframeBodyElement().scrollLeft = 0;
		
		document.getElementById(FCK.RulerControllor.view+"DataL").style.width = event.clientX+"px";
		FCK.RulerControllor.move.setData2(FCK.RulerControllor.view+"DataL", FCK.RulerControllor.view+"DataR", x<20, Math.floor(100*x/width)+"%");
		FCK.RulerControllor.findIframeBodyElement().style.marginLeft = x+"px";
	}
	else if(FCK.RulerControllor.direction=="right" && event.clientX>0)
	{
		var width = FCK.RulerControllor.move.width();
		var x = width-event.clientX+FCK.RulerControllor.verticalWidth;

		if(event.clientX>FCK.RulerControllor.verticalWidth+width)
			return;

		FCK.RulerControllor.findIframeBodyElement().scrollLeft = FCK.RulerControllor.findIframeBodyElement().scrollWidth;

		document.getElementById(FCK.RulerControllor.view+"DataR").style.width = (document.getElementById("xEditorRulerH").offsetWidth-event.clientX-5)+"px";
		document.getElementById(FCK.RulerControllor.view+"DataL").innerHTML = Math.floor(100*x/width)+"%";
		FCK.RulerControllor.findIframeBodyElement().style.marginRight = x+"px";
	}
	else if(FCK.RulerControllor.direction=="top" && event.clientY>FCK.RulerControllor.verticalTop)
	{
		var height = FCK.RulerControllor.move.heigth();
		var y = event.clientY-FCK.RulerControllor.verticalTop;

		FCK.RulerControllor.findIframeBodyElement().scrollTop = 0;
		
		document.getElementById(FCK.RulerControllor.view+"DataT").style.height = y+"px";
		document.getElementById(FCK.RulerControllor.view+"DataT").innerHTML = y<20?"":Math.floor(100*y/height)+"%";
		document.getElementById(FCK.RulerControllor.view+"DataT").style.fontSize = (y<20?"1":"12")+"px";
		document.getElementById(FCK.RulerControllor.view+"DataB").innerHTML = y<20?Math.floor(100*y/height)+"%":"";
		document.getElementById(FCK.RulerControllor.view+"DataB").style.fontSize = (y<20?"12":"1")+"px";
		FCK.RulerControllor.findIframeBodyElement().style.marginTop = y+"px";
	}
	else if(FCK.RulerControllor.direction=="bottom" && event.clientY>FCK.RulerControllor.verticalTop)
	{
		var height = FCK.RulerControllor.move.heigth();
		var y = event.clientY-FCK.RulerControllor.verticalTop;

		if(y>height)
			return;

		FCK.RulerControllor.findIframeBodyElement().scrollTop = FCK.RulerControllor.findIframeBodyElement().scrollHeight;

		document.getElementById(FCK.RulerControllor.view+"DataB").style.height = (document.getElementById("xEditorRulerV").offsetHeight-y-5)+"px";
		document.getElementById(FCK.RulerControllor.view+"DataT").innerHTML = Math.floor(100-100*y/height)+"%";
		FCK.RulerControllor.findIframeBodyElement().style.marginBottom = (height-y)+"px";
	}

	FCK.RulerControllor.saveMargin();
}

FCK.RulerControllor.move.y = function(element, offsetTop)
{
	if(element.id && element.id=="xEditorTable")
		return offsetTop+element.offsetTop;

	return FCK.RulerControllor.move.y(element.parentNode, offsetTop+element.offsetTop);
}

FCK.RulerControllor.move.width = function()
{
	return FCK.RulerControllor.findIframeBodyElement().clientWidth;
}

FCK.RulerControllor.move.heigth = function()
{
	return FCK.RulerControllor.findIframeBodyElement().clientHeight;
}

FCK.RulerControllor.move.setData2 = function(data1, data2, value, data)
{
	document.getElementById(data1).innerHTML = value?"":data;
	document.getElementById(data1).style.fontSize = (value?"1":"12")+"px";
	document.getElementById(data2).innerHTML = value?data:"";
	document.getElementById(data2).style.fontSize = (value?"12":"1")+"px";
}

FCK.RulerControllor.saveMargin = function()
{
	var ibody = FCK.RulerControllor.findIframeBodyElement();
	var dbody = FCK.RulerControllor.findIframeBodyMarginElement();

	if(!dbody)
		return;

	dbody.setAttribute("mleft",ibody.style.marginLeft);
	dbody.setAttribute("mright",ibody.style.marginRight);
	dbody.setAttribute("mtop", ibody.style.marginTop);
	dbody.setAttribute("mbottom", ibody.style.marginBottom);
}

FCK.RulerControllor.findIframeBodyMarginElement = function()
{
	var ibody = FCK.RulerControllor.findIframeBodyElement();

	if(ibody.innerHTML.indexOf("x-editor-body-margin")==-1)
	{
		ibody.innerHTML = ibody.innerHTML+"<divv id='x-editor-body-margin' style='position:absolute;top:-1500px;left:-500px;display:none;height:0;width=0;line-height:0;border:0;' mleft='0px' mright='0px' mtop='0px' mbottom='0px'></divv>";
		//ibody.focus();
	}
	var ele = window.frames[0].document.getElementById('x-editor-body-margin');
	if(ele)return ele;
	for(var i = 0; i<ibody.childNodes.length; i++){
		if(ibody.childNodes[i].id=="x-editor-body-margin")
			return ibody.childNodes[i];
	}
	return null;
}

FCK.RulerControllor.findIframeBodyElement = function()
{
	return window.frames[0].document.body;
}
function hideOrShow(status) {
	var btn = document.getElementById("fckeditor_save_btn");
	if(btn){
		btn.disabled=status;
		btn.className=(status=="disabled"?"btn-short-dis":"btn-short");
	}
	var spans = document.getElementsByTagName("SPAN"),span=null;
	if(spans){
		for ( var i = 0, len = spans.length; i < len; i++) {
			span = spans[i];
			if(span && span.className && span.className.indexOf("editbox-button") > -1){
				span.setAttribute("disabled",status);
				span.className=(status=="disabled"?"editbox-button editbox-button-dis":"editbox-button");
			}
		}
	}
}
</script>
</head>
<body>
<table id="xEditorTable" width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
<tr><td>
	<table id="xEditorTable" width="100%" cellpadding="0" cellspacing="0" style="height: 100%; table-layout: fixed">
		<tr id="xToolbarRow" style="display: none">
			<td id="xToolbarSpace" style="overflow: hidden">
				<div id="xToolbarTabs" style="display:none;">
					<div class="tabItemL tabActive" id="xToolbarTabsStandard" onclick="FCK.Tab.changeToolbar('Standard', 'Form');">
						<div class="tabItemR">
							<div class="tabItem">编辑内容</div>
						</div>
					</div>
					<div class="tabItemL" id="xToolbarTabsForm" onclick="FCK.Tab.changeToolbar('Form', 'Standard');">
						<div class="tabItemR">
							<div class="tabItem">设计表单</div>
						</div>
					</div>
				</div>
				<div id="xToolbarForm" style="display:none;"><table class="TB_Toolbar"><tr><td><div class="TB_Start"></div></td><td style="font-size:12px;">表单控件：</td><td>
					<span class="editbox-button" onclick="parent.Ext.milan.pagejs.page_archive.showFormTree()"><i class="icon ico-edit-form"></i>　整个表单</span>
					<span class="editbox-button" onclick="parent.outsideButtEvent('TextField','freeflow_formContent',this)"><i class="icon ico-edit-input"></i>单行输入框</span>
					<span class="editbox-button" onclick="parent.outsideButtEvent('Textarea','freeflow_formContent',this)"><i class="icon ico-edit-textarea"></i>多行输入框</span>
					<span class="editbox-button" onclick="parent.outsideButtEvent('MyRadio','freeflow_formContent',this)"><i class="icon ico-edit-radio"></i>　单选框</span>
					<span class="editbox-button" onclick="parent.outsideButtEvent('MyCheckbox','freeflow_formContent',this)"><i class="icon ico-edit-checkbox"></i>　复选框</span>
					<span class="editbox-button" onclick="parent.outsideButtEvent('MySelect','freeflow_formContent',this)"><i class="icon ico-edit-select"></i>　下拉列表</span>
					<span class="editbox-button" onclick="parent.outsideButtEvent('MyListBox','freeflow_formContent',this)"><i class="icon ico-edit-listbox"></i>　列表框</span></td><td>
					<div class="TB_End"></div></td></tr></table>
			    </div>
				<div id="xToolbarStandard">
					<table width="100%" cellpadding="0" cellspacing="0">
						<tr id="xCollapsed" style="display: none">
							<td id="xExpandHandle" class="TB_Expand" colspan="5">
								<img class="TB_ExpandImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
						</tr>
						<tr id="xExpanded" style="display: none">
							<td id="xTBLeftBorder" class="TB_SideBorder" style="width: 1px; display: none;"></td>
							<td id="xCollapseHandle" style="display: none" class="TB_Collapse" valign="bottom">
								<img class="TB_CollapseImg" alt="" src="images/spacer.gif" width="8" height="4" /></td>
							<td id="xToolbar" class="TB_ToolbarSet"></td>
							<td id="xToolbarAdvanced" style="display:none;"><div class="hide" onclick="javascript:FCK.toolbarAdvanced(this);"></div></td>
							<td class="TB_SideBorder" style="width: 1px"></td>
						</tr>
					</table>
				</div>
			</td>
		</tr>
		<tr>
			<td id="x-editor-ruler-h" valign="top" style="display:none;">
				<table id="xEditorRulerH" width="100%" cellspacing="0" border="0" style="background-color:#ECE8ED;font-size:12px;" onmousemove="FCK.RulerControllor.move(event);">
					<tr>
						<td id="xEditorRulerLeftDataL" align="right" width="16px"></td>
						<td width="1px" style="background-color:#9BBBE3;font-size:1px;cursor:e-resize" onmousedown="FCK.RulerControllor.preprocess('left', 'xEditorRulerLeft');"></td>
						<td id="xEditorRulerLeftDataR" align="left">0%</td>
						<td id="xEditorRulerRightDataL" align="right">0%</td>
						<td width="1px" style="background-color:#9BBBE3;font-size:1px;cursor:e-resize" onmousedown="FCK.RulerControllor.preprocess('right', 'xEditorRulerRight');"></td>
						<td id="xEditorRulerRightDataR" width="16px" style="font-size:1px;"></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td valign="top" height="100%">
				<table width="100%" height="100%" cellspacing="0" border="0">
					<tr>
						<td id="x-editor-ruler-v" style="display:none;width:12px; height:100%;padding:0px;"><table id="xEditorRulerV" width="100%" height="100%" cellspacing="0" border="0" style="background-color:#ECE8ED;font-size:12px;" onmousemove="FCK.RulerControllor.move(event);">
							<tr>
								<td id="xEditorRulerTopDataT" height="1px" style="layout-flow:vertical-ideographic;text-align:right;font-size:1px;"></td>
							</tr>
							<tr>
								<td height="3px" style="background-color:#9BBBE3;font-size:1px;cursor:n-resize" onmousedown="FCK.RulerControllor.preprocess('top', 'xEditorRulerTop');"></td>
							</tr>
							<tr>
								<td id="xEditorRulerTopDataB" style="layout-flow:vertical-ideographic;text-align:left;">0%</td>
							</tr>
							<tr>
								<td id="xEditorRulerBottomDataT" style="layout-flow:vertical-ideographic;text-align:right;">0%</td>
							</tr>
							<tr>
								<td height="3px" style="background-color:#9BBBE3;font-size:1px;cursor:s-resize" onmousedown="FCK.RulerControllor.preprocess('bottom', 'xEditorRulerBottom');"></td>
							</tr>
							<tr>
								<td id="xEditorRulerBottomDataB" height="16px"></td>
							</tr>
						</table></td>
						<td id="xEditingArea" valign="top" style="height: 100%"></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</td>
<td style="height:100%;width:100px;display:none;" valign="top" id="xToolbarUserDefined">
	<div style="height:100%;border:1px solid #CCCCCC;background:#ECE8ED;text-align:center;">
	   	<div style="text-align:center;width:100%;font-size:14px;font-weight:bold;border-bottom:1px solid #CCCCCC;margin-top:5px;">表单控件</div>
		<span class="editbox-button" onclick="parent.outsideButtEvent('TextField','wf_editor',this)"><i class="icon ico-edit-input"></i>单行输入框</span>
		<span class="editbox-button" onclick="parent.outsideButtEvent('Textarea','wf_editor',this)"><i class="icon ico-edit-textarea"></i>多行输入框</span>
		<span class="editbox-button" onclick="parent.outsideButtEvent('MyRadio','wf_editor',this)"><i class="icon ico-edit-radio"></i>　单选框</span>
		<span class="editbox-button" onclick="parent.outsideButtEvent('MyCheckbox','wf_editor',this)"><i class="icon ico-edit-checkbox"></i>　复选框</span>
		<span class="editbox-button" onclick="parent.outsideButtEvent('MySelect','wf_editor',this)"><i class="icon ico-edit-select"></i>　下拉列表</span>
		<span class="editbox-button" onclick="parent.outsideButtEvent('MyListBox','wf_editor',this)"><i class="icon ico-edit-listbox"></i>　列表框</span>
	   	<span class="editbox-button" onclick="parent.outsideButtEvent('MacroWidgets','wf_editor',this)"><i class="icon ico-edit-widgets"></i>　宏控件</span>
	   	<span class="editbox-button" onclick="parent.outsideButtEvent('MacroDateTime','wf_editor',this)"><i class="icon ico-edit-datetime"></i>　日历控件</span>
	   	<span class="editbox-button" onclick="parent.outsideButtEvent('MacroCalculate','wf_editor',this)"><i class="icon ico-edit-calculate"></i>　计算控件</span>
	   	<span class="editbox-button" onclick="parent.outsideButtEvent('SerialNumber','wf_editor',this)"><i class="icon ico-edit-number"></i>流水号控件</span>
	   	<span class="editbox-button" onclick="parent.outsideButtEvent('EmbeddedTable','wf_editor',this)"><i class="icon ico-edit-emtable"></i>　内嵌表格</span>
	   	<input type="button" class="btn-short" value="保 存" id="fckeditor_save_btn" onclick="parent.save();" style="margin-top:130px;"/>
	   	<input type="button" class="btn-short" value="关 闭" onclick="parent.closeDesigner();"/>
	</div>
</td>
	</tr>
</table>
</body>
</html>